# Treasure-Maps Copyright 2009, Thea Ganoe. This program is distributed under the terms of the GNU General Public License


from django import newforms as forms
from google.appengine.ext import db


class Route(db.Model):
  routeName = db.StringProperty(default='new')
  owner = db.UserProperty()
  author = db.StringProperty()
  latitude = db.StringProperty(default='37.0')
  longitude = db.StringProperty(default='-96.0')
  intro = db.TextProperty()
  zoom = db.IntegerProperty(default=15)
  state = db.StringProperty(choices=set(["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming", "USA", "CANADA", "MEXICO", "SOUTH AMERICA", "EUROPE", "ASIA", "AUSTRALIA"])) 
  locationName = db.StringProperty(default='None')
  typeTrail = db.StringProperty(choices=set(["roads", "commuter", "railtrail","hiking trail", "unpaved", "bikeroute", "event", "waterway", "other"]))
  organization = db.StringProperty(default='None')
  rating = db.IntegerProperty(default=0)
  parking = db.TextProperty()
  restrooms =  db.TextProperty()
  comments = db.TextProperty()
  leftLinks = db.TextProperty()
  way =  db.TextProperty()
  gpx = db.TextProperty()
  img = db.StringProperty(default='/static/rambler4.jpg')

  def __str__(self):
    return '%s' %self.key()

  def get_absolute_url(self):
    return '/route/%s/' % self.key()




    

